import 'package:regular_assess/helper/utils/localization/strings.dart';

///国际化类型
enum LocalizationType {
  ///中文
  zh,

  ///英语
  en,

  ///藏语
  bo,

  ///繁体
  hk,
}

extension LocalizationString on String {
  String get ls {
    switch (LocalizationStrings.type) {
      case LocalizationType.en:
        return en;
      case LocalizationType.bo:
        return bo;
      case LocalizationType.hk:
        return hk;
      default:
        return this;
    }
  }

  ///英语
  String get en {
    return LocalizationStrings.ens[this] ?? this;
  }

  ///藏语
  String get bo {
    return LocalizationStrings.bos[this] ?? this;
  }

  ///繁体
  String get hk {
    return LocalizationStrings.hks[this] ?? this;
  }
}
